<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>

<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<script type="text/javascript" src="/bigjo/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/bigjo/js/json2.js"></script>
<script type="text/javascript">
	jQuery.noConflict(); // 예약어로 사용되는 "$" 문자를 다른 라이브러리와 충돌이 나지 않게 하는 역할을 한다.
	jQuery(document).ready(function() {
		jQuery("#main_loginform input[type=submit]").click(function() {

			var idx = document.URL.indexOf("bigjo");
			var str = document.URL.substring(0, idx + 5);
			var m_id = $("#m_id").val();
			var m_pw = $("#m_pw").val();

			if (m_id == null || m_id == "") {
				alert("아이디를 입력하세요");
				return;
			}
			if (m_pw == null || m_pw == "") {
				alert("패스워드를 입력하세요");
				return;
			}
			/* jQuery.ajax({
				url : str + "/memberLogin.mb?m_id=" + m_id + "&m_pw=" + m_pw,

				error : function(data) {
					alert("로그인 실패!!");
				},
				success : function(data) {
					jQuery("#main_login").html(data);

				}
			}); */
			document.location.href = str +"/memberLogin.mb?m_id=" + m_id + "&m_pw=" + m_pw;
		});

		jQuery.noConflict();
		jQuery("#accession").click(function() {
			var idx = document.URL.indexOf("bigjo");
			var str = document.URL.substring(0, idx + 5);
			jQuery("#mainBody").load(str + "/insertForm.mb");
		});

		jQuery.noConflict();
		jQuery("#Search").click(function() {
			var idx = document.URL.indexOf("bigjo");
			var str = document.URL.substring(0, idx + 5);
			jQuery("#mainBody").load(str + "/searchForm.mb");
		});

	});
</script>
<body>
	<article id="main_login">
		<article id="main_loginform">
			<table style="margin:1px;">
				<tr>
					<td><input type="text" name="m_id" id="m_id" value="music1"></td>
					<td rowspan="2"><input type="submit"
						style="width: 70px; height: 70px;" class="login" name="login"
						id="login" value="로그인"></td>
				</tr>
				<tr>
					<td><input type="password" name="m_pw" id="m_pw"
						value="music1"></td>
				</tr>
			</table>
		</article>
		<article id="main_subform">
			<input type="button" name="accession" id="accession" value="회원가입">
			<input type="button" name="Search" id="Search" value="ID/PW찾기">
		</article>
	</article>
</body>
</html>